From: Eli Zaretskii Date: Mon, 16 Feb 2004 17:03:40 +0000 (+0000) Subject: (match-string-no-properties): Use substring-no-properties. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~24082 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=cea501a21b4b5fb30ef96685045c243cde3abd62;p=emacs.git (match-string-no-properties): Use substring-no-properties. --- diff --git a/lisp/subr.el b/lisp/subr.el index 2e7b2f12ab0..641d81a6fb6 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1985,10 +1985,8 @@ Zero means the entire text matched by the whole regexp or whole string. STRING should be given if the last search was by `string-match' on STRING." (if (match-beginning num) (if string - (let ((result - (substring string (match-beginning num) (match-end num)))) - (set-text-properties 0 (length result) nil result) - result) + (substring-no-properties string (match-beginning num) + (match-end num)) (buffer-substring-no-properties (match-beginning num) (match-end num)))))